package api

import (
	"github.com/gin-gonic/gin"
)

type Response struct {
	Code string `json:"code"`
	Msg  string `json:"msg"`
	Data any    `json:"data"`
}

func Res(c *gin.Context, status int, res Response) {
	c.AbortWithStatusJSON(status, res)
}

func ResErr(c *gin.Context, status int, response Response) {
	c.AbortWithStatusJSON(status, response)
}
